package com.itxinyu.src.web.action;

import com.itxinyu.src.entity.User;
import com.itxinyu.src.service.Loginservice;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class LoginAction extends ActionSupport{
	private Loginservice ls;
	private User u;
	public String login() throws Exception {
		User user =ls.login(u);
		ActionContext.getContext().getSession().put("uuser", user);
		return "toHome";
	}
	public User getU() {
		return u;
	}
	public void setU(User u) {
		this.u = u;
	}
	public Loginservice getLs() {
		return ls;
	}
	public void setLs(Loginservice ls) {
		this.ls = ls;
	}
	
}
